<form class="layui-form layui-box" style='padding:25px 30px 20px 0' action="menu/save" data-auto="true" method="post">
    <div class="layui-form-item">
        <label class="layui-form-label">上级菜单</label>
        <div class="layui-input-block">
            <select name='pid' class='layui-select full-width' style='display:block'>
                <option selected  value='0'>选择父菜单</option>
                <#list menus as mn>
	               	 <option  value='${mn.id?c}'>${mn.key!""}${mn.title!""}</option>
                </#list>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">菜单名称</label>
        <div class="layui-input-block">
            <input type="text" name="title"  required="required" title="请输入菜单名称" placeholder="请输入菜单名称" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">菜单链接</label>
        <div class="layui-input-block">
            <input type="text" onblur="(this.value === '') && (this.value = '#')" name="url" autocomplete="off" required="required" title="请输入菜单链接" placeholder="请输入菜单链接" value="#" class="layui-input typeahead">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">菜单图标</label>
        <div class="layui-input-inline" style='width:300px'>
            <input placeholder="请输入或选择图标" onchange="$('#icon-preview').get(0).className = this.value" type="text" name="icon" class="layui-input">
        </div>
        <span class='layui-btn layui-btn-primary' style='padding:0 12px;min-width:45.2px'>
            <i id='icon-preview' style='font-size:1.2em' class=''></i>
        </span>
        <button data-icon='icon' type='button' class='layui-btn layui-btn-primary'>选择图标</button>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">绑定节点</label>
        <div class="layui-input-block">
            <select name='nodeId' class='layui-select full-width' style='display:block'>
           		<option selected value='0'>请选择</option>
                <#list nodes as n>
	               	<option value='${n.id?c}'>├&nbsp;&nbsp;${n.node}</option>
                </#list>
                
            </select>
        </div>
    </div>
    <div class="hr-line-dashed"></div>
    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>
</form>
<script>

</script>
